//
//  DHSettingControllerCell.m
//  Dresshere
//
//  Created by ZhangPeng on 2017/12/27.
//  Copyright © 2017年 张朋. All rights reserved.
//

#import "DHSettingControllerCell.h"

@interface DHSettingControllerCell()

@property (strong, nonatomic) UIImageView *arrowImageView;

@end

@implementation DHSettingControllerCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.titleLabel = [[UILabel alloc] init];
        [self.titleLabel setFont:[UIFont systemFontOfSize:16]];
        [self.titleLabel setTextColor:[UIColor colorWithHexString:@"#4a4a4a"]];
        [self.contentView addSubview:self.titleLabel];
        
        self.arrowImageView = [[UIImageView alloc] init];
        [self.arrowImageView setImage:[UIImage imageNamed:@"ritht_arrow"]];
        [self.arrowImageView setContentMode:UIViewContentModeCenter];
        [self.contentView addSubview:self.arrowImageView];
        
        self.desLabel = [[UILabel alloc] init];
        self.desLabel.font = [UIFont systemFontOfSize:14];
        self.desLabel.textAlignment = NSTextAlignmentRight;
        self.desLabel.textColor = [UIColor colorWithHexString:@"#1A81FE"];
        [self.contentView addSubview:self.desLabel];
        
        self.lineView = [[UIView alloc] initWithFrame:CGRectMake(15, 63.5, kScreenWidth, 0.5)];
        self.lineView.backgroundColor = [UIColor colorWithHexString:@"#C8C7CC"];
        [self addSubview:self.lineView];
    }
    return self;
}

- (void)layoutSubviews{
    [super layoutSubviews];
    
    self.titleLabel.frame = CGRectMake(15, 0, kScreenWidth - 40, 64);
    self.arrowImageView.frame = CGRectMake(kScreenWidth - 40, 0, 40, 64);
    self.desLabel.frame = CGRectMake(0, 0, 250, self.height);
    self.desLabel.right = self.arrowImageView.left - 3;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
